<?php

namespace App\Console\Commands;

ini_set('default_socket_timeout', 5000);

use Illuminate\Console\Command;

use App\Http\Managers\MySoap;
use SoapClient;


class TestSoap extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'test:soap';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'soap status';
	
    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
		
    }
	

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {

		$options = array(
			'exceptions'=>1,
			'trace' => 1, 
			'keep_alive' => false,
			'connection_timeout' => 5000,
			'cache_wsdl' => WSDL_CACHE_NONE,
			'compression'   => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
		);
// http://222.222.126.240:8001/KFPTService?wsdl
// http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL
       $soap = new SoapClient('http://222.222.126.240:8001/KFPTService?wsdl', $options);    
		// print_r($soap->__getFunctions());
		//	print_r($soap->__getTypes());  

		// $ret = $soap->__soapCall('GetPlatformParam', $options);		
  
		$ret = $soap->GetPlatformParam(); 

		dd($ret);
		


    }
	

}
